#ifndef SINGLETON_H
#define SINGLETON_H
/*
#endif // SINGLETON_H

#ifndef PG_SINGLETON_H___
#define PG_SINGLETON_H___
*/
#ifndef NDEBUG
#include <cassert>
#endif

namespace sk
{
    template <typename T>
            class Singleton {
            public:
        static T& Instance()
        {
            static T res;
            return res;
        }
    private:
        Singleton(Singleton const&);
        Singleton& operator=(Singleton const&);
    protected:
        Singleton()
        {
#ifndef NDEBUG
            static int num = 0;
            assert(num == 0);
            ++num;
#endif
        }
        ~Singleton()
        {
        }

    };	// class Singleton
} // namespace core

#endif
